<div class="breadcrumbwidget">
	<ul class="skins">
        <li><a href="default" class="skin-color default"></a></li>
        <li><a href="orange" class="skin-color orange"></a></li>
        <li>&nbsp;</li>
        <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
        <li class="wide"><a href="" class="skin-layout wide"></a></li>
    </ul><!--skins-->
	<ul class="breadcrumb">
        <li><a href="<?php echo $baseurl?>">Trang chủ</a> <span class="divider">/</span></li>
        <li class="active">Danh sách thực đơn</li>
    </ul>
</div><!--breadcrumbwidget-->
<div class="pagetitle">
	<h1>Quản lý danh sách thực đơn</h1> <span></span>
</div>
<div class="maincontent">
    <div class="contentinner">    
    
        <?php $attr = array('class' => 'stdform','id' => 'form-list'); echo form_open('', $attr);?>
        <div id="dyntable_length" class="dataTables_length  content-dashboard">
        <input type="hidden" name="check-delete" value="1" />
            <a href="<?php echo $baseurl.'manage/menus/add-menus'?>" class="btn"><i class="icon-plus"></i> Thêm mới</a>
        </div>
    	<table class="table table-bordered">
            <colgroup>
                <col class="con0" />
                <col class="con1" />
                <col class="con0" />
                <col class="con1" />
                <col class="con0" />
                <col class="con1" />
            </colgroup>
            <thead>
                <tr>
                	<th class="centeralign" style="width: 5%;"><input type="checkbox" class="checkall" /></th>
                     <th>Hình ảnh thực đơn</th>
                    <th>Tên nhà hàng</th>
                    <th>Khu vực - thành phố</th>
                   
                    <th class="centeralign" style="width: 10%">Tác vụ</th>
                </tr>
            </thead>
            <tbody>
            <?php if(!in_array($data, array(null, '', '0'))):?>
            <?php
                $i = 1;
             foreach($data AS $el=>$le):
            $idata = $le->slide_image;
            
            ?>
                <tr>
                	<td class="centeralign"><input name="checkboxs[]" id="<?php echo $le->id?>" type="checkbox" value="<?php echo $le->id?>" /></td>
                   <td>
                        <?php foreach ( json_decode($idata) AS $el1=>$le1 ){ ?>
                          <img class="alerthtmlbutton1" data-img="<?php echo $imgbase.$le1->image;?>" data-name="<?php echo $le1->name;?>" alt="<?php echo $le1->name;?>" style="margin-right: 5px;float: left;height: 60px;width: 60px;" src="<?php echo $imgbase.$le1->image;?>" onError="this.src='<?php echo $baseurl."public/theme/manage/img/gray_jean.png";?>'" /> 
                        <?php }
                        ?>
                    </td>
                   <td><?php echo $le->name?></td>
                    <td><?php echo $le->title?></td>
                    <td class="centeralign">
                        <a href="<?php echo $baseurl.'manage/menus/edit-menus/'.$le->id?>" class=""><span class="icon-edit"></span></a>
                        <a href="<?php echo $baseurl.'manage/menus/delete-menus/'.$le->id?>" class="delete-a"><span class="icon-trash"></span></a>   
                    </td>
                </tr>
            <?php endforeach;?>
            <?php endif?>
            </tbody>
        </table>
        <div class="dataTables_info" id="dyntable_info">
            <div class="pagination">
                <?php echo $this->pagination->create_links();?> 
            </div>
        </div>
        </form>
    </div>
</div>
<style>
.table th, .table td {
vertical-align: middle !important;
}
</style>

<script>
jQuery('.alerthtmlbutton1').click(function(){
	var img = $(this).attr("data-img");
	var name = $(this).attr("data-name");
   jAlert('<center><img style="height: 400px;" src="'+img+'"/></center>');
});  
</script>